/*
 * @Author: Hzt
 * @Date: 2024-01-11 17:48:43
 * @LastEditTime: 2024-05-17 20:25:26
 * @LastEditors: Hzt
 * @Description: 
 * @FilePath: \cty_admin\src\views\trafficPrice\config\modal.config.js
 */
import {ISP_TYPE, DEVICE_TYPE} from "@/config/enum"
export const modalFormConfig = {
  labelWidth: "100px",
  itemLayout: {
    padding: "10px 40px",
  },
  colLayout: { span: 24 },
  alwaysShow: true,
  formItems: [
    {
      field: "price",
      type: "number",
      label: "流量价格",
      placeholder: "请输入流量价格",
      rules: [{ required: true, message: "请输入流量价格", trigger: "blur" }],
      otherOptions: {
        type: "number",
      },
      slot:{
        append:"元"
      }
    },
    {
      field: "bandwidth",
      type: "input",
      label: "流量值",
      placeholder: "请输入流量值",
      otherOptions: {
        type: "number",
      },
      slot:{
        append:"GB"
      },
      rules: [{ required: true, message: "请输入流量值", trigger: "blur" }],
    },
    {
      field: "ispCode",
      type: "select",
      label: "运营商",
      placeholder: "请选择运营商",
      rules: [{ required: true, message: "请选择运营商", trigger: "blur" }],
      options: ISP_TYPE
    },
    {
      field: "channelId",
      type: "select",
      label: "渠道",
      placeholder: "请选择渠道",
      rules: [{ required: true, message: "请选择渠道", trigger: "blur" }],
      options: []
    },
    {
      field: 'deviceType',
      type: 'select',
      label: '设备类型',
      placeholder: '请选择设备类型',
      rules: [{ required: true, message: '请选择设备类型', trigger: 'blur' }],
      options: DEVICE_TYPE
    },
    {
      field: "basicProfitRate",
      type: "inputNumber",
      label: "分润比例",
      placeholder: "请输入分润比例",
      otherOptions: {
        type: "number",
        max:1,
        min:0,
        step:0.1,
        style:"width:100%"
      },
      rules: [{ required: true, message: "请输入分润比例", trigger: "blur" }],
    },
    {
      field: "statusValue",
      type: "select",
      label: "状态",
      placeholder: "请选择状态",
      rules: [{ required: true, message: "请选择状态", trigger: "blur" }],
      options: [
        { label: "启用", value: 1 },
        { label: "禁用", value: 0 },
      ],
    },
  ],
};
